#include "MainWindow.h"

MainWindow::MainWindow(void)
{
	QMenu *fileMenu = new QMenu(tr("&File"), this);
	QMenu *helpMenu = new QMenu(tr("&Help"), this);

	
    QAction *exportAction = fileMenu->addAction(tr("&Export"));
	QAction *saveAction = fileMenu->addAction(tr("&Save"));
	QAction *openAction = fileMenu->addAction(tr("&Open"));
	QAction *helpAction = helpMenu->addAction(tr("&Pomoc"));
    exportAction->setShortcut(QKeySequence(tr("Ctrl+E")));
	menuBar()->addMenu(fileMenu);
	menuBar()->addMenu(helpMenu);

	

	centralWidget = new Plots();
	setCentralWidget(centralWidget);
    resize(900, 500);
	setWindowTitle(tr("PLOT"));
	
	connect(exportAction, SIGNAL(triggered()), centralWidget, SLOT(exportPlot()));
	connect(saveAction, SIGNAL(triggered()), centralWidget, SLOT(savePlot()));
	connect(openAction, SIGNAL(triggered()), centralWidget, SLOT(openPlot()));

}

MainWindow::~MainWindow(void)
{
}

